<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title>TMEP v6.2</title>
  <style type="text/css" media="all">
  <!--
    body{ font-family: verdana; font-size: 12px; line-height: 20px; vertical-align: center; background: #F3F2DD; }
    h1, h2, h3, h4, a { color: darkred; }
    img { border: 2px solid darkred; }
  //-->
  </style>
  </head>
  <body>

  <h1>TMEP v6.2</h1>

  <p>application for a nice view of TME/TH2E output using HTTP GET method</p>

  <p><b>Authors:</b><br>
  Michal "MultiTricker" Ševčík, <a href="mailto:multi@tricker.cz">multi@tricker.cz</a>, <a href="http://multi.tricker.cz">http://multi.tricker.cz</a>,<br>
  František "EFES" Ševčík, <a href="mailto:f.sevcik@seznam.cz">f.sevcik@seznam.cz</a></p>

  <p><b>Sponsor:</b><br>
  <b>Papouch</b> - <a href="http://www.papouch.com">http://www.papouch.com</a>, manufacturer of these great devices</p>

  <hr>
  
  <h2>TOC</h2>

  <ol>
    <li><a href="#introduction">Introduction</a></li>
    <li><a href="#instalation">Installation</a></li>
    <li><a href="#update">Update to v5/6.2</a></li>
    <li><a href="#chagelog">Changelog</a></li>
  </ol>

  <hr>

    <h2><a name="introduction">Introduction</a></h2>

 <p>Dear users,</p>
 
  <p>what you have downloaded is a small web application written in PHP, which uses
database (typically MySQL) and class JpGraph or Open flash chart for generating 
graphs. It can nicely show ip some useful statistics from your ethernet 
thermometer/hydrometer.</p>

  <p>How it works? Your TME with access to Internet (or local network) sends actual
measurement to PHP script. Script writes this measurement into database for 
future data generating.</p>

  <p>For new versions and future informations, please check out 
<a href="http://multi.tricker.cz">my blog</a> or <a href="http://www.papouch.com">Papouch website</a> and if 
you need some help or just want to say "thanks", you can give contact me <a href="mailto:multi@tricker.cz">multi@tricker.cz</a></p>

  <hr>

    <h2><a name="instalation">Installation</a></h2>

  <p>Now, let´s make it work:</p>
  
  <h3>1) First, we need to setup TME/TH2E unit.</h3>

<h4>Setting up TH2E</h4>

<a href="nastaveni-th2e.gif" target="_blank"><img src="nastaveni-th2e.gif" alt="Nastaveni" title="Nastaveni" border="0" height="120" width="160"></a>

<p>Connect onto TH2E website and choose settings. There is need to have correctly filled up parameters on tab "Network", 
most importantly IP address, mask, gateway and DNS. Next, choose tab "Sending" and fill address of web server, port (80), 
scripts folder on server, period for sending GET (1 - once per minute) and fill script name (index.php). </p>

<p>For example, if address of your app will be <i>http://moje.mereni.cz/aplikace/</i>, then fill:<br>
<b>Web server address:</b> moje.mereni.cz<br>
<b>Port:</b> 80 (standard port)<br>
<b>Script folder on server:</b> aplikace/<br>
<b>GET sending period:</b> 1<br>
<b>Script name (GET):</b> index.php</p>

<h4>Setting up newer TME</h4>

<a href="nastaveni-tme.gif" target="_blank"><img src="nastaveni-tme.gif" alt="Nastaveni" title="Nastaveni" border="0" height="120" width="160"></a>

<p>Connect onto TME website and choose settings. There is need to have correctly filled up parameters on tab "Network", 
most importantly IP address, mask and gateway. Next, choose tab "Sending" and fill IP address of web server, 
web server name (www.someting.com), port (80), scripts folder on server, period for sending (60 sec - once per minute) and check activation of HTTP GET sending and 
fill Script name (index.php). </p>

<p>For example, if address of your app will be <i>http://moje.mereni.cz/aplikace/</i>, then fill:<br>
<b>Web server address:</b> <i>you will find out this from your web hosting provider or with ping utility</i><br>
<b>Web server name:</b> moje.mereni.cz<br>
<b>Port:</b> 80 (standard port)<br>
<b>Script folder on server:</b> aplikace/<br>
<b>Script name:</b> index.php</p>

<h4>Setting up oldest TME (1.6, 1.7)</h4>

<a href="nastaveni-tme-stare.gif" target="_blank"><img src="nastaveni-tme-stare.gif" alt="Nastaveni" title="Nastaveni" border="0" height="120" width="160"></a>

  <p>Connect into TME via configuration utility from Papouch. (You can find configuration utility here: 
<a href="http://www.papouch.com/cz/shop/product/tme-ethernetovy-teplomer/">http://www.papouch.com/cz/shop/product/tme-ethernetovy-teplomer/</a>). 
On item HTTP GET check "Send temperature on HTTP server",
into URL path write full path where web application will be located and file 
index.php, ie.: http://www.lojzuvweb.cz/tme/index.php<br>
  Into IP address write IP address of web server, where site is located.
This address can be very easily filled up when you click onto "at" symbol.</p>

  <p>Next, set up sending period 60 sec (once every minute, application counts with 
this settings) and into GUID fill some random word without diacritics and spaces - 
you will need this on further step.</p>

  <p>Finally save settings.</p>

  <h3>2) Configuring TMEP</h3>

  <p>In folder "app" are all needed files and there is also file 
"config.php", where you must fill out values for connection to database
(database server, username, password, database name). You should get these 
values from your webhosting provider. If you are using oldest TME, then there is VERY IMPORTANT to set GUID 
and instead "teplota" fill your own string from first step.</p>

  <h3>3) Setting up database</h3>

  <p>There is need to create proprietary tables in database, where scripts save 
values from TME. Which program/web application for table create you use, is on 
you. SQL code for execution is located in file "mysql-db-full.sql".</p>

  <h3>4) Uploading application on web</h3>

  <p>Now, upload whole web application (everything what folder "app" 
contains) on it´s place on internet. Path to "index.php" must be the exact path,
that you set up in first step into TME/TH2E via configuration utility.</p>

  <p>Now, everything should be set up and saved, how it supposed to be. 
  Application now receive measured values and generate some text statistics and 
graphs.</p>

  <p>Thank you for attention and have fun</p>

  <hr>

    <h2><a name="update">Update to v6.2</a></h2>

 <p>How to UPDATE on TMEP v5/6.2:</p>
 
  <p>It´s pretty simple. You need to:</p>
  
  <p>1) Update database scheme. To do that, just execute "mysql-db-update-v5.sql" 
on your database. It will do the necessary changes. You can use some simple database 
administration for that task. I recommend Adminer - http://www.adminer.org.</p>

  <p>2) Overwrite old files with the new ones except "config.php", 
located in "app" folder in archive you downloaded along with this update instructions.
If you did any changes in old files, you will need to do them again (in CSS styles etc.).
Rename file "nastaveni.php" to "config.php". 
Add line with "$vlhkomer" in "config.php" to determine if you want to show measured 
humidity. No need for this if you do not measure it.</p>

  <p>3) Delete "cache" folder in application. There is no need for it now.</p>

  <p>4) There is need to compute a lot of information about measurements from earlier days except actual day.
  To do so, open script "scripts/dopocitat.php" in your browser from application website. Do it as long as needed - 
  script will write what day has just been finished. This could take some time on slow servers with huge 
  database of measurements. These calculations are also realized when page of TMEP app is opened.
  For me, it took about 3 minutes to compute more than 3 years of measurements, so it should be very quick.</p>

  <hr>

    <h2><a name="chagelog">Changelog</a></h2>

    <h3>verze 6.2 (2013-02-27)</h3>

    <ul>
      <li>SQL queries optimalization - pages are now loaded faster and some operations are way too faster. Consultation and solution provided by database guru Radek Trubnyj - thank you very much!</li>
      <li>Fixed number of measurements in monthly statistics (showed when hygrometer is not presented).</li>
      <li>Fixed actual day MIN/MAX measurements representation if maximal value is zero.</li>
      <li>Fixed typo in czech language.</li>
    </ul>

    <h3>version 6.1 (2013-02-02)</h3>

    <ul>
      <li>Now is included polish translation. Thanks goes to <a href="http://www.meteoshop.cz" target="_blank">www.meteoshop.cz</a> for this translation.</li>
      <li>Mobile version now have overview of top temperatures/humidity on actual day.</li>
      <li>Changed redirection for mobiles - if not used, then library for this task is not loaded (which works only on PHP 5 or newer).</li>
      <li>Some SQL querys were optimized.</li>
      <li>Fixed wrong include for javascript file in mobile version.</li>
    </ul>

    <h3>version 6 (2012-12-01)</h3>

    <ul>
      <li>Integrated jQuery FancyBox to show some more windows with statistics and graphs.</li>
      <li>On tab "Actually" is now row with min, max and avegare temerature (and humidity) for today.</li>
      <li>Abilty to show more history (31 days) for "Earlier at this time" and even for specific time and with graph.</li>
      <li>Ability to show 15 days with recordly high or low temerature (absolute and average).</li>
      <li>Ability to show day overview with highest and lowest temperature records in database.</li>
      <li>Ability to show new area range graph for daily and monthly statistics of temperature humidity.</li>
      <li>Ability to show longer history for monthly records.</li>
      <li>Ability to show longer history at specific day time.</li>
      <li>Ability to show temperature and humidity progress in graph for whole year (day by day).</li>
      <li>More code cleaning.</li>
      <li>Fixed French translation.</li>
    </ul>

    <h3>version 5 (2012-10-28)</h3>

    <ul>
      <li>Graphs are now generated by Highcharts JS (http://www.highcharts.com/). OFCH and JpGraph are gone. Graphs are now better, more sexy and with a lots of possibilities.</li>
      <li>Temperature, humidity and dew point are now in one graph.</li>
      <li>Better detection for mobile devices (using PHP library Mobile_Redirect - http://code.google.com/p/php-mobile-detect/). Tablets are not redirected to mobile version.</li>
      <li>Not measured values are not represented by zero in some cases.</li>
      <li>Change in DB schema to allow write "null" value into table tme_denni.</li>
      <li>In graphs is now mentioned unit at values (was not possible before).</li>
      <li>Fixed missing icon of refresh and home in mobile version.</li>
      <li>Fixed graphs insertion in mobile version.</li>
      <li>Code optimalization and clean up. Lots unused line of code and some nonsense is gone.</li>
      <li>Fixed missing “ajax-loader.png” and “icons-18-white.png” for mobile version.</li>
      <li>Actualized jQuery mobile</li>
      <li>All scripts are now in UTF-8.</li>
    </ul>

    <h3>version 4.2 (2011-08-08)</h3>

    <ul>
      <li>New version of page for mobile devices and automatic redirect on it. Mobile page uses JavaScript library jQuery Mobile, mostly optimalized for iPhone and Android devices (Cyrille David - <a href="mailto:cyrille@david-gooris.com">cyrille@david-gooris.com</a>).</li>
      <li>Actualized French translations and some typos (Cyrille David - <a href="mailto:cyrille@david-gooris.com">cyrille@david-gooris.com</a>).</li>
      <li>Icon for switch to mobile view added to menu (Cyrille David - <a href="mailto:cyrille@david-gooris.com">cyrille@david-gooris.com</a>).</li>
    </ul>

    <h3>version 4.1.1 (2011-07-01)</h3>

    <ul>
      <li>Added French translation from Dominique Stussi - <a href="mailto:d.stussi@swch.name">d.stussi@swch.name</a>.</li>
    </ul>

    <h3>version 4.1 (2011-03-26)</h3>

    <ul>
      <li>Dew point (TH2E).</li>
      <li>Combined graphs for both temperature and humidity (TH2E).</li>
      <li>Some cosmetics enhancements.</li>
    </ul>

    <h3>version 4 (2011-03-10)</h3>

    <ul>
      <li>Full support for TH2E! Application now show also measured humidity (must be explicitly enabled within configuration file).</li>
      <li>There are new informations about measured humidity - actual humidity, humidity measured in past days by this time (also AJAXed), new graphs and also tabs with statistics has been extended with these data.</li>
      <li>New tab "history" to show older measurements.</li>
      <li>Application now have no problems with receiving data from old TME, actual TME and TH2E.</li>
      <li>File with informations about application has been extended about setting infos for old TME, actual TME and TH2E.</li>
      <li>Papouch configuration utility for oldest TME has been removed from TMEP package (no need for it here :).</li>
    </ul>

    <h3>version 3 (2011-01-14)</h3>
    
    <ul>
      <li>Better webpage layout with several tabs. New tabs: "Daily statistics", "Monthly statistics" and "Year statistics" with a lot additional informations about measured temperatures.</li>
      <li>In field "actual temperatur" are now present arrows to show how temperatur changed in last five minutes (it gets cold, warm or no change).</li>
      <li>Fields "current temperature", "earlier at this time" and "measurements count" are loaded via AJAX periodically (once per minute).</li>
      <li>Monthly temperature graph now show also maximal and minimal temperature per month (not only average).</li>
      <li>JpGraph actualized on version 3.0.7.</li>
      <li>New HTML read me file.</li>
      <li>Removed folder "Cache" and some great optimizations were made.</li>
      <li>Updated database schema for more easier and yet fast lookup for many informations.</li>
      <li>Actualized utility for setting up TME from Papouch (TME manufacturer). This utility is included for more comfort, but not needed for newest TME (they can be setted up via web interface).</li>
    </ul>

    <h3>version 2</h3>
    
    <ul>
      <li>New better design without redundant items.</li>
      <li>Ability to switch between static (JpGraph) and flash graphs (Open Flash Chart).</li>
      <li>Ability to switch between languages.</li>
      <li>Ability to switch between various temperature scales.</li>
      <li>Little version for mobile devices (mobile.php).</li>
      <li>More options for setup in "config.php" (default language, temp. scale and graph type, if page will be automatically refreshed, if visitor can switch language etc.).</li>
      <li>And few details...</li>
    </ul>

    <h3>version 1</h3>

    <ul>
      <li>Initial release</li>
    </ul>

  </body>
</html>
